/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qdu.servlet;

import com.qdu.service.ReplyService;
import com.qdu.service.impl.ReplyServiceImpl;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Ice
 */
@WebServlet("/vmbrls_mxz")
public class ViewMBReplyListServlet extends HttpServlet {

    ReplyService replyService = new ReplyServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        int cid = Integer.parseInt(req.getParameter("cid"));
        
        List<Object[]> replyList=replyService.findReplyListByCid(cid);  //根据评论编号获取回复信息
        
        HttpSession session = req.getSession();
        session.setAttribute("replyList", replyList);
        
        req.getRequestDispatcher("/thisReply.jsp").include(req, resp);

    }

}
